<?php

/**
 * 违规大类控制器
 * @author yuzy 2015-5-13
 */

namespace mybackend\controllers;

use common\services\myhtsq\ViolatedCategoryService;

class ViolatedCategoryController extends BaseController {

    protected $_categoryService;

    public function __construct($id, $module, ViolatedCategoryService $categoryService, $config = []) {
        $this->_categoryService = $categoryService;
        parent::__construct($id, $module, $config);
    }

    /**
     * 违规大类列表
     * @return array
     */
    public function actionGetViolatedCategoryListForDdl() {
        $result = $this->_categoryService->getViolatedCategoryListForDdl();
        $this->exportJson($result, $this->_categoryService->getErrCode(), $this->_categoryService->getErrMsg()); 
    }
}
